<script language="javascript" type="text/javascript" src="javascripts/site.js"></script>

<% @page_title = ' :: New Storage System' %>

<% content_for :sidebar do %>
	<div class="little_infos">
		<div class="little_content"><%= awareness_message %></div>
		
		<div class="little_content">
			<span class="sidebar_title">Visit</span>
			<%= link_to 'Storage Systems', :action => 'index' %>
		</div>
	</div>
<% end %>

<h1>New Replication System</h1>

<% form_for :replica_system, :url => { :action => 'create' } do |f|  %>
<% field_set_tag do %>
	<div class="span-17 last">
		<p><label for="replica_system_name">Storage System Name</label><br />
		<%= f.text_field :name, :class => 'text required_field' %></p>
	</div>
		
	<hr class="separator" />
	<div class="span-7">
		<p><label for="replica_system_hostname">Hostname</label>
		<%= f.text_field :hostname, :class => 'text required_field' %><br />
		<span class="text_info">E.g.: www.example.com/; example\; <br />c:/; /</span></p>
	</div>
	
	<div class="span-7 last">
		<p><label for="replica_system_internal_uri">Internal Path</label>
		<%= f.text_field :internal_uri, :class => 'text' %><br />
		<span class="text_info">E.g.: radio/assets/; media\music\</span></p>
	</div>
	
	<hr class="separator" />
	<p><%= check_box_tag :enable_autentication, '1', false, :onclick => 'enable_activation(true)' %>
	<label for="enable_autentication">This Replication System requires autentication</label></p>
	
	<div class="span-7">
		<p><label for="replica_system_username">Username</label>
		<%= f.text_field :username, :disabled => true, :class => 'text' %></p>
	</div>
	
	<div class="span-7 last">
		<p><label for="replica_system_password">Password</label>
		<%= f.password_field :password, :disabled => true, :class => 'text' %></p>
	</div>
	
	<hr class="separator" />
	<div class="span-7">
		<p><label for="replica_system_protocol">Protocol</label><br />
		<%= f.select :protocol, @protocols.collect {|p| p}, { :prompt => 'Select a Protocol' } %></p>
	</div>
	
	<% if !@main_replica %>
	<div class="span-7 last">
		<p><%= f.check_box :main %>
		<label for="replica_system_main">This is main Storage System.</label></p>
	</div>
	<% end %>

<% end %>
	<div class="span-17 centered last">
		<%= submit_tag "Create Replication System", :disable_with => "Creating&hellip;", :class => 'buttons' %>
	</div>
<% end %>